package com.snake.repositories;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.snake.mapper.WxComponentTokenMapper;
import com.snake.models.WxComponentToken;


@Service
public class WxComponentTokenServiceImpl implements WxComponentTokenService {
	@Autowired
	private WxComponentTokenMapper wxComponentTokenMapper;

	@Override
	public WxComponentToken add(WxComponentToken t) {
		// TODO Auto-generated method stub
		WxComponentToken add = wxComponentTokenMapper.add(t);
		return add;
	}

	@Override
	public WxComponentToken delete(WxComponentToken t) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public WxComponentToken update(WxComponentToken t) {
		// TODO Auto-generated method stub
		WxComponentToken update = wxComponentTokenMapper.update(t);
		return update;
	}

	@Override
	public WxComponentToken getById(int id) {
		// TODO Auto-generated method stub
		Map<String, Object> params=new HashMap<String, Object>();
		params.put("wxComponentTokenId", id);
		WxComponentToken byId = wxComponentTokenMapper.getById(params);
		return byId;
	}

	@Override
	public List<WxComponentToken> getByList(Map<String, Object> params) {
		// TODO Auto-generated method stub
		List<WxComponentToken> byList = wxComponentTokenMapper.getByList(params);
		return byList;
	}
	
	
}
